<!-- 管理学生报名信息 -->
<template>
	<view class="container">
		<view class="c-cell" @click="toMineSignUpInfo">
			<u-cell-group>
				<u-cell v-for="item in signUpList" :key="item.id" icon="man-add" :title="item.student_name" :value="item.exam_grade_title" :label="item.match_type_name" size="large" :data-id="item.id"></u-cell>
			</u-cell-group>
		</view>
		<view class="c-empty" v-if="signUpList.length==0">
			<u-empty icon="/static/empty/list.png" text="暂无学生报名信息" textSize="18" marginTop="25%" width="80%"></u-empty>
		</view>
	</view>
</template>

<script>
	export default {
		name:"",
		data() {
			return {
				// 学生报名列表
				signUpList:[],
				query:{
					page:1,
					page_size:20
				}
			}
		},
		onLoad(){
			this.getStudentSignUpList()
		},
		onReachBottom(){
			this.query.page+=1
			this.getStudentSignUpList()
		},
		methods: {
			// 跳转报名信息详情
			toMineSignUpInfo(e){
				if(e.target.dataset.id){
					this.navigateTo("/pages/pages_mine/public/mineTestSignUpInfo?id="+e.target.dataset.id)
				}
			},
			// 获取学生报名列表
			getStudentSignUpList(){
				this.$http.teacherTestList(this.query).then(res=>{
					this.signUpList = this.signUpList.concat(res.data)
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.container{
		
	}
</style>
